﻿

-- 用户查询
CREATE procedure [dbo].[UserInfo_Get]
@UserName varchar(100)=null,
@PassWord varchar(100)=null
as

select 
UserName,PassWord,Type,FullName,case Type when 0 then '管理员' when 1 then '数据录入' when 2 then '门禁管理' else '未知' end Type_desc
from User_Info 
where (@UserName is null or UserName=@UserName) and (@PassWord is null or PassWord=@PassWord)